Optimal. Leaf size=17 \[ x-2 \sqrt {3} \tanh ^{-1}\left (\frac {x}{\sqrt {3}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.00, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {396, 213}
\begin {gather*} x-2 \sqrt {3} \tanh ^{-1}\left (\frac {x}{\sqrt {3}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 396
Rubi steps
\begin {align*} \int \frac {3+x^2}{-3+x^2} \, dx &=x+6 \int \frac {1}{-3+x^2} \, dx\\ &=x-2 \sqrt {3} \tanh ^{-1}\left (\frac {x}{\sqrt {3}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 33, normalized size = 1.94 \begin {gather*} x+\sqrt {3} \log \left (\sqrt {3}-x\right )-\sqrt {3} \log \left (\sqrt {3}+x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 15, normalized size = 0.88
method | result | size |
default | \(x -2 \arctanh \left (\frac {\sqrt {3}\, x}{3}\right ) \sqrt {3}\) | \(15\) |
risch | \(x +\sqrt {3}\, \ln \left (x -\sqrt {3}\right )-\sqrt {3}\, \ln \left (x +\sqrt {3}\right )\) | \(26\) |
meijerg | \(-\arctanh \left (\frac {\sqrt {3}\, x}{3}\right ) \sqrt {3}-\frac {i \sqrt {3}\, \left (\frac {2 i \sqrt {3}\, x}{3}-2 i \arctanh \left (\frac {\sqrt {3}\, x}{3}\right )\right )}{2}\) | \(38\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 22, normalized size = 1.29 \begin {gather*} \sqrt {3} \log \left (\frac {x - \sqrt {3}}{x + \sqrt {3}}\right ) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.29, size = 26, normalized size = 1.53 \begin {gather*} \sqrt {3} \log \left (\frac {x^{2} - 2 \, \sqrt {3} x + 3}{x^{2} - 3}\right ) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.02, size = 27, normalized size = 1.59 \begin {gather*} x + \sqrt {3} \log {\left (x - \sqrt {3} \right )} - \sqrt {3} \log {\left (x + \sqrt {3} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 30 vs.
\(2 (14) = 28\).
time = 0.82, size = 30, normalized size = 1.76 \begin {gather*} \sqrt {3} \log \left (\frac {{\left | 2 \, x - 2 \, \sqrt {3} \right |}}{{\left | 2 \, x + 2 \, \sqrt {3} \right |}}\right ) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.92, size = 14, normalized size = 0.82 \begin {gather*} x-2\,\sqrt {3}\,\mathrm {atanh}\left (\frac {\sqrt {3}\,x}{3}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________